User's Guide to Melodia Professional by John Dunn Software and documentation Copyright (c) 1993-1994 John Dunn. All Rights Reserved. Introduction: Melodia is one of an emerging group of computer music tools known as "algorithmic composing programs." These programs generally are attempts to free musical artists from the tyranny of a tradition that grew out of the physical limitations of the medium, just as photography freed visual artists. They do not try to replace the traditional methods. They do offer a completely new medium with new rules and with different strengths and limitations. With Melodia, you concentrate on the overall patterns and sound relationships of your music. You will do best if you approach it with an open mind, unencumbered with the need to make it sound like the music that is familiar to you. By allowing the computer to do the grunt work of playing the instruments and keeping track of the math-like musical relationships, you are freed to do what humans do best: the creative part. Overview: Melodia consists of two video pages: Play, and Compose. You can combine the Play and Compose pages into one screen with the "Zoom" menu command, or you can flip between them with the "Page" command. To exit the program, save files, or to do some specialized stuff such as setting MIDI sync or manipulating the Sequencer Bank data (more about this later), you can pop up the "File" menu at any time. The Play page gives you control over which instruments are playing at any given time, and their rhythms, timbres, and volumes. An instrument along with its performance controls is represented by one of 16 horizontal lines on the Play page and is called a "voice." The top two lines of the Play Page control the playing of a composition by stepping through up to 64 stages. Each stage is a snapshot of the current settings of the Play and Compose menus. The usual process for composing a piece of music is to set up a pattern on the first stage, then to step through the following stages and progressively modify the sound: bring up more voices, fade the current ones out, etc. Selecting "Strt" will then step through the stages, playing each one for the number of measures you selected. The Compose Page is the heart and soul of Melodia. This is where you select the pitch, timing, and other relationships, where you compose your music. Although the appearance of all those numbers in neat rows seems intimidating at first, there are actually only a few different process, each repeated several times. These processes are used to generate pitches and other formatting controls such as Pan and Modulation. They have been designed to be simple in concept but powerful in the virtually infinite ways they may be combined. At the bottom of the page are the Clocks, which control rhythm. There are 16 clock modules that combine to make 12 clocks. The modules combine beats to make polyrythms as simple or as complex as you like. On-line Help and Color Codes: Every active area on the Melodia screen has a built in help line that is printed at the bottom of the screen when you press the right mouse button. The rule is simple: click the right mouse button to see what an area does, click the left button to do it. You can actually hold the right button down and move the mouse about the screen to get a quick scan of what all the controls in the area are about. Each help line will indicate which of the three mouse gestures you need to use for the function: "Click" is simply a left mouse click. Often you will get additional feedback (such as the control changing color) if you hold the button down for a moment when you click it. "Dial" means to move the mouse left or right while holding the left button down. The control you are changing will be highlighted while you are dialing it. When you reach the desired value, release the left mouse button - the value will remain, the highlight will go away, and the mouse cursor will reappear. "Slide" is similar to Dial, except it is used on the sliding bar controls. While holding the left mouse button down, slide left or right. The value of the control will change as will its position on the bar. Release the mouse button to select the value. In addition to the on-line help, the controls have a consistent color coding that tell you at a glance how a control functions. White, green, cyan (light blue), and magenta (light purple) numbers all indicate an active control that can be changed by the mouse. Yellow and non-numeric magenta labels are informational only and cannot be changed by the mouse. Some of these are documented by the on-line help, but most of them are simply documented as: "Not an active area." The power behind Melodia's scheme is that most numeric controls take either values or connections. Values are just that, numeric values you dial in. These will be colored white for values from 0 to 99, and magenta for values from 100 to 127. Since 0-127 is the MIDI value range, this is also the range used by Melodia. Connections are the value at the output of one of the Compose Page processes. You get these by dialing a value left past zero. It will turn green and take on the label of the process. Processes all have magenta labels that identify them, and they have bright blue output fields that are the values that are returned when you have one selected as a connection. Connections are covered in detail in the Compose section of this document. Play Page: The Play Page is divided into two parts: the top of the page controls global parameters such as tempo and the actual sequencing of the stages. It is the computer equivalent of the conductor. The rest of the page consists of the sixteen lines that control the voices. These are like the musicians in the orchestra. Voice Controls: To get sound, the first thing you must do is click on the blue square on the far left of the voice line you want to "fire up." When a voice is on, the mute switch will be bright red, when the voice is off (mute) the switch will be blue. The text labels just above the four groups of four (sixteen total) voice lines has only one active control, the Mute/Solo switch. When in Mute ("M") mode, the leftmost red/blue mute switches that select and identify which voice is active can have any combination of voices on or off that are changed by/remembered by the stage sequencer. When in Solo ("S") mode the switch setting is not remembered by or changed by the stage sequencer. The column of little dots just after the Mute switch is the copy protect dot for the entire voice. There are also copy protect dots for each group of functions within the voice. More about copy protect dots later. The column labeled "Ch" selects the MIDI channel for the voice. If you are using a multiple line MIDI interface there will be 16 channels for each line, with the first line at 0-15, the second at 16-31 and so on. You are free to change the channels at any time, to any value. This gives you the ability to freely move from one set of instruments to another. Only 16 will play at any given time, but you can actually use dozens of different channels in a single composition. "Pc" is the Program Change column. This sends a MIDI Program Change command to the channel when the voice is first started (either by turning on the Mute switch or by releasing the Halt switch), or when the value is changed. "Tsp" is Transpose. It is a value that is added to the "Kb" (Keyboard note value) input. Think of it as the lowest possible pitch the voice can play. When you dial the notes, notice that there are no flats. Although you can easily set up any scale in any key you wish within the 12-tone system, the 128 notes recognized by MIDI are given their absolute C-major names. The octave of middle C, for example runs consecutively from MIDI note 60 = C/5. The next column, "Clk" is actually three items grouped together with no space between. Together, they control the rhythmic feel of the voice. The first two of these control the actual rhythm, the third controls pitch delay that strongly influences perceived rhythm. The first of these, the light blue letter icon, is the Clock selector. The default is for the first voice to get clock A, the second to get B, etc. But this is arbitrary, and you can and probably should make changes. All clock selectors have a range of A-L for the 12 Clocks, plus "M" and "N" the measure clocks. The note icon controls the action of the clock beat. You can change it to one of four settings: a legato (maximum "on" time) every clock tick, a normal note every clock tick, a note only when the pitch changes, and a legato note only when the pitch changes. If you think you should be getting sound from a voice but aren't, check that you have a note icon with a double flag (normal note every clock tick). Last of the three is the Pitch Delay selector. This value can be changed by dialing from 0 to 9, then A to F, a total of 16. Its purpose is to delay the pitch for the number of clock ticks given. At 0 there is no delay; at 1 there is a delay of one tick; at 2, two ticks; and so on up to a delay of 15 ticks at F. To understand this effect, set two voices to the same pitch pattern and the same clock, then dial a low number into one (only) of the two voices. You will hear the pattern bounce from one voice to another. A brief word about rhythms here: Traditional Western music rhythms were derived from Gregorian chants, which were patterned after human speech. This has worked well for us for some 600 years, but today we have computers and therefor other options. Although Melodia has the ability to produce sequenced rhythms of any kind, it is best suited to produce rhythmic structures by using different clocks that beat against one another. It takes some getting used to, but with a little exploring you will find rich new rhythmic structures, along with new ways to build more traditional structures. Actually the method is not all that new. Schillinger was using it to codify music in the 1930's, and for centuries before that some of the most sophisticated rhythmic music on the planet has been produced in essentially the same way by tribal African musicians. "Kb," the Keyboard input (improperly named since there is no keyboard), determines the pitch of a note. It is always combined with "Tps," Transpose, just before being sent out to the MIDI channel. Along with every note sent to MIDI there is also a value called "Velocity" (labeled "Vl") that represents to MIDI how hard you are hitting the key. It is supported by most synthesizers, usually making the note louder and brighter with higher values. There are three Kb inputs, but only two Vl inputs. The first Kb uses the first Vl value, and the 2nd and 3rd Kb use the same, 2nd Vl value. A velocity of 0 tells MIDI to turn the note off, so if the first Vl is 0, the first Kb note will not be sent, and if the 2nd Vl is 0, the 2nd and 3rd Kb notes will not be sent. For added flexibility, the Kb inputs are combined in different ways according to whether the 2nd Vl is 0. If the 2nd Vl is set to a value (not connection) of 0, the 2nd and 3rd Kb inputs (which otherwise would be unused since 0 turns their MIDI note generation off) are added to the 1st Kb input. If the 2nd Vl is on (anything other than 0), the value of the first Kb will be added to the 2nd and 3rd Kb inputs. This gives you the option of having multiple pitch inputs to a single note: When you use the 1st Kb and Vl to produce the note, and the 2nd Vl is off (set to 0), the 2nd and 3rd Kb inputs act as additional transpose inputs to the 1st Kb. Used another way, and it gives you an easy way to produce chords: With the 2nd Vl on, the 2nd and 3rd Kb inputs act as interval offsets to the root value of the 1st Kb input. It doesn't matter whether the 1st Vl is on or off. If it is on you get a 3 note chord, if it is off you get two notes. Put another way, the 2nd and 3rd Kb inputs will produce two simultaneous notes if their shared Vl is on (not zero). The pitch will be a combination of the respective Kb input plus the 1st Kb input plus the Tsp (transpose) setting. A third simultaneous note will be produced if the 1st Vl is also on, and its pitch will be a combination of the 1st Kb input plus the Tsp setting. Finally, if the 2nd Vl input is off (zero), the 2nd and 3rd Kb inputs do not produce notes, but their values are added to the 1st Kb, so that the pitch of the single note produced (assuming the 1st Vl is on) will be a combination of all 3 Kb inputs plus the Tsp setting. Following the note controls are the global modulation controls which, like the Program Change control discussed earlier, affect all notes generated by the selected MIDI channel. Because of this, it is best to assign every voice a unique MIDI channel. If two or more voice use the same MIDI channel, the last modulation control sent will remain in effect for all those voices. "At," Aftertouch, also called Channel Pressure, is supported in different ways by different synths, sometimes by different patches on the same synth. Often it is used as a crossfade from one sound to another. Experiment with this one. All of the inputs following are MIDI Control Change inputs. MIDI Control Change sends two parameters to the synth, the control number which identifies what the parameter is used for, and the value of the parameter. You only work with the value to send, the control number will be determined by the input you use. MIDI control numbers are more or less standardized, although few synths recognize all of them. Most synths support the standard control numbers for Volume, Modulation, and Pan. Other control numbers tend to be used for some patches in some synths, and not used for others. Control Change numbers used by Melodia are the most commonly supported, (almost) standardized ones. However you can optionally change any Control Change number by running the setup program, "MPSETUP." "Fp" is the Foot Pedal controller, MIDI Control Change #4. There is little agreement on what effect this should have; different synths and different patches on the same synth use it in different ways, or not at all. "Pt" is Portamento Time, MIDI Control Change #5. It is supported by most synths that are not sample based. Some modern sample based synths support it as well, although few of the older ones do. This sets the portamento time, and a second switch input (described next) will turn portamento on and off. The column of green dots labeled "PSN" are on/off switches. The first two are MIDI Control Changes that are interpreted as full on or full off by most synths. Click on them to switch from off (0) to on (127). When on, the green dot turns to a bright yellow circle. The first of the three, "P" is the Portamento switch mentioned above. It is MIDI Control Change #65. The 2nd switch, "S" is the Sustain (sometimes called "Damper Pedal") switch, MIDI Control Change #64. These switches are not uniformly implemented in all synths. The third switch, labeled "N," does not send a Control Change to MIDI. Instead, when on it inhibits Melodia from sending Note-off messages. The acoustic effect of this on most synths is similar to the Sustain switch, the sounds are layered as thickly as the synth can handle. The "N" switch is especially useful when using a Melodia voice line to control light controllers, which generally do not like to receive MIDI Note-Off messages. "Bc," following the switches, is Breath Controller, MIDI Control Change #2. Not uniformly implemented, but when it is you can often get striking results by using a moving value. This input is unique because it sends its output to MIDI whenever it is changed rather than only at the beginning of a note. Be careful with this, as a very rapidly moving input could overload the MIDI line. Such MIDI clogging does no harm, but it may cause timing errors and other glitches. "Md," is Modulation, MIDI Control Change #1. It acts like the modulation wheel on a keyboard synth, usually adding vibrato or tremolo to the sound. Modulation is well supported. "Pan" moves sound from left (Pan value 0) to right (Pan value 127). It is MIDI Control Change #10, and it is supported by most synths. The arrow at the left of the Pan control is the polarity switch. Click on it to switch from up to down. When down, the ranges for Left and Right are switched. This is very useful to control pan of two voices so they move about but always remain symmetrical. For a simple example of this, dial the green connection "R5" (which will generate a random number between 0 and 127) into two pan inputs of two voices, with one arrow set up and the other down. Dial the same clock into the two voices. You should get a very lively bounce of the sounds as they randomly pan left and right, but remain separated. Pan defaults to a mid value, 63, which has a special significance. When set to this value, Melodia does not send any Pan message at all. This allows synths such as the Proteus that loose internal pan settings when they receive an external message to retain the internal settings. "Vol," Volume is MIDI Control Change #7, well-supported but also changeable by Setup. In the default setup, the Fade slider control to the right uses the same Control Change number as the Vol input, with the Fade value limiting the maximum volume actually sent to MIDI. For example, if the Fade slider is set to "9," the maximum value that Vol will actually send to MIDI is 72 (9 * 8 steps per Fader click) regardless of the value at the Vol input. The Fade slider becomes especially useful when you start building a multiple stage composition. This is because of the Slew control to its left, which turns the Fade slider into an automated mixing console. By setting Slew values to anything other than 0, the Fade slider will automatically fade from the value at the last step, toward the setting at the current step. Volumes will instantly jump to their settings if Slew = 0, or if the Halt control is clicked. Slew times increase as the value increases and are not affected by the Tempo setting. Thus, 0=instant, 1=fastest slew, 127=slowest slew. Automated Mixer Interface: The Fade sliders may optionally configured to control automated mixers, independent of the MIDI volume sent by Vol. There is a powerful advantage of using an automated mixer in large setups because all inputs not actively producing music are muted and therefore do not add to the background noise level. To control an automated mixer with the Melodia fader controls, run MPSETUP and select option 6, "Change Fader Control #'s?" In the default mode, there will be only one option, "Primary fade base control #," which defaults to "voice," meaning the faders use the same Control Change as the voice line's Vol control. At any time, you can return this option to its default by giving the input -1. Melodia assumes the automated mixer uses groups of consecutive MIDI Control Change messages to control volumes, but beyond that there is considerable flexibility built in to accommodate most mixers. The following example describes how to configure CM Automation's MX-816 to control 8 stereo synth module outputs, with each synth using 2 Melodia voice lines. Run MPSETUP and select option 6, "Change Fader Control #'s?" then set as follows: 1. Primary fade base control # .. 20 (whatever the MX-816 is set to) 2. Primary fade channel.......... 1 (whatever controls the MX-816) 3. Secondary fade base control# 28 (left is 20-27, right is 28-35) 4. Secondary fade channel........ 1 (only 1 MX-816) 6. Initialization Pgm Change # ... 100 (turns off all MX-816 inpust) 7. Shutdown Pgm Change # ......... 101 (turns on all MX-816 inputs) The following setup uses two MX-816 mixers (both set up identically, one used for left front & back, the other for right front & back) and 8 stereo synth modules to give a 4-channel mix: 1. Primary fade base control # .. 20 (whatever the MX-816 is set to) 2. Primary fade channel.......... 1 (whatever controls the MX-816) 3. Secondary fade base control# 28 (front is 20-27, back is 28-35) 4. Secondary fade channel........ 1 (both MX set to same channel) 6. Initialization Pgm Change # ... 100 (turns off all MX-816 inpust) 7. Shutdown Pgm Change # ......... 101 (turns on all MX-816 inputs) Conductor Controls: The two lines of controls at the top of the Play page are mostly for the stage sequencer. You can and probably should spend a lot of time with Melodia without ever using the stage sequencer. But once you have mastered the basics, you will find that these controls will give you the tools to turn what was perhaps an interesting pattern into a complete composition. The idea behind the stage sequencer is to give you tools to progressively alter your music in stages that can smoothly transition from one to the next. There are up to 64 stages, each of which can last from 1 to 999 measures. You build your composition by developing your musical themes, then by copying each stage to the next, and modifying that in some way. Turn voices on, fade others out, change modulation, musical themes, etc. At any time you can insert copies of earlier stages, delete stages, and so on. Then, when you click on the Strt control, the stages will play, each for the number of measures you have specified, from start to finish. The main stage controls are the top line Strt, Stop, and Cont commands and the blue Stage control, plus the measure control. Before you can use the stage sequencer, you have to dial in the number of measures you want a stage to play. You do this by dialing a number into the rightmost green control on the second line that initially says "M=Stop." Dial to the right for a measure count, dial to the left for Stop, Exit, or Loop. When in the default Stop mode, Melodia plays the current stage until you select Halt or exit the program. Stop doesn't stop playing, it simply stops advancing stages. Halt, on the line below, stops and starts playing. Exit is the same as Stop, except it will also exit the program. It will only Exit the program if two conditions are met. First, you have to be in Play or Cont, second you have to had opened Melodia with a filename at the command line: MP MYMUSIC. By selecting Exit instead of Stop, when you load it with a file name as described above, it will start playing as soon as it is called, and exit after it is finished; you can even set up a DOS batch file that will run a series of compositions automatically. To run several pieces from a batch file, save each piece so that it ends with Exit, then edit a text file (giving it an extension of ".bat") so that each line calls MM with the file you want to run. For example, edit a file named MYCOMP.BAT to look something like this: MP PART1 MP PART2 MP PART3 MP FINALE Use "Save As.." from the DOS text editor to give the file its name ("MYCOMP.BAT"). If you used the editor from the MP File menu it will normally be put into the WORK directory, which is a subdirectory of MP. The .BAT file has to be in the MP directory, which you can do with the DOS COPY command, or by giving it the MP directory name at the outset. Then, to run your batch file, simply type its name instead of MP. If this is all confusing to you, ask DOS for help. Type "help edit," or "help copy," or simply "help." If you have DOS Version 5.0 or later, it will tell you about itself. For earlier versions you will have to consult the DOS manual. The light blue number just to the right of the measure control is the readout of the current measures played on the current stage. This is set to 0 when the stage is first entered, and starts counting up according to the values defined in the tempo and time signature. Tempo, just to the right of Halt, selects the musical tempo in quarter notes per minute. The time signature selects the number of beats per measure / the note value of the beat. The default of 4/4 is four quarter notes per measure. 3/4 would be 3 quarter notes per measure. 2/8 is two eighth notes per measure. When you change these values, it will affect the total playing time of your piece. This will be indicated by the changed total time indicator on the far right of the line. To the right of the time signature is the Dots control. This turns the write protect dots on and off all at a time. The write protect dots are the little green dots just to the left of each voice line and each of the process and clock lines on the Compose page. When on (high yellow), the line is protected from being changed by Pop Top and Prev. You can use Dots to turn them all on or off, then click on the individual dots to selectively flip them. Pop, Top, and Prev are all ways to copy a previous stage onto the current one. To use Pop or Top, you will first have to Push a stage onto the stage stack. Then you can fetch it with Pop, or copy it with Top. Prev simply copies the previous stage, and is perhaps the most useful of these. Compose Page: There are two parts to the Compose page. The Process modules take up the top three fourths of the page, the Clock modules are on the bottom quarter. Clocks: As the name implies, the clocks control the timing of events. The most obvious event is a note turning on and producing sound. But some other process are also clocked - that is, the process waits until a clock ticks before producing a new value. Although the default setup runs all processes with the same clock, you should experiment with setting different clocks and different clock rates. The clocks are labeled with the red letters A - L. For the first four clocks, A-D, there are two identical clocks modules per clock beat. Both of the A clocks combine to give the A clock beat, and so on for B, C, and D. You can build complex polyrhythms by setting the individual clock modules to different rates. Clocks E - L are single module clocks. Each clock has a rate of 0 (off) to 384 (4 whole notes). These are relative clock ticks, not actual time values. For example a quarter note is always 24 ticks, an eighth note 12 ticks, and so on. The actual duration of a quarter note is set by the Tempo; however long the duration is, an eighth note will always be half that. The green controls labeled "No(te)" allow you to dial in standard note values for 32nd through Double Whole notes. You can also dial in the actual clock rate ("Rt"). Which ever one you dial, the other will also read out. If you dial a rate of 6, the note readout will say "Sn," for Sixteenth note. Dial 7, and the readout is "??," meaning there is no standard note value for that clock rate; dial 8, and the note readout becomes "Et," meaning Eighth note triplets; dial 9 and you get "S." a dotted Sixteenth note. The fastest clock rate you can dial is note value "Tt," or rate of 2. This is one tick on and one tick off, two ticks total. The note value is a 32nd triplet ("Tt"). Dialing a rate either of 0 or 1 effectively turns off the clock: from the No(te) column, you can dial a note value of "--" which is rate 0, which is off. If you dial left past "--" you get green connection labels. These are the same connections found throughout Melodia, but Clocks use them in a slightly different context. The only values recognized by clocks are zero = off, and not zero = on. That is, any value produced by a process that is not zero will result in the clock being on, only when the process produces a zero will the clock go to off. In addition to the clock note value/rate, you can also control the note delay time and the sustain time. Both of these values are in percentage of total note time. Delay ("Dl") sets the time delay for when the clock is turned on. Sustain ("Su") sets how long the clock will remain on vs. how long it will be off. Clocks will always be on for at least one tick, and off for at least one tick. In the case of a clock rate of 2, that is all there is, and delay and sustain controls have no meaning. They also have no meaning when you are using connections instead of clock ticks for your clocks. For all other clock rates, the delay value is calculated as the number of ticks before the clock will turn on, then the sustain is the number of ticks it will remain on. If the total of sustain plus delay exceeds 100%, the sustain is shortened appropriately. For example if a clock is set to a rate of 24 (a quarter note), the delay is set to 25 and the sustain is set to 50, the clock will remain off for 6 ticks (25% delay) then go on for 12 ticks (50% sustain) then go off for an additional 6 ticks (what's left). Increase the delay to 75 percent and the clock will stay off for the first 18 ticks, then go on for 5 ticks and off for the last tick. There are actually two additional, hidden clocks. The 13th and 14th clocks, called "M" and "N" (A-L, then M and N) are the measure clocks. Both will go on at the start of the measure. "M" will stay on for the entire measure up to the last tick, and off only for that last tick; "N" goes on for only one clock tick at the start of the measure. The actual time value of a measure is set by the time signature on the top of the Play page. At the default time signature of 4/4, this is the same as a whole note, at 2/4 it would be the same as a half note. Clocks are automatically synchronized. However if you are using a second sequencer you may want to synchronize remotely, or you may want your other sequencer to know when Melodia has synchronized. Melodia uses the MIDI Tune Request signal for this. It is used only if you have enabled Sync send or receive (see File Menu). If you have another synth that uses Tune Request, you can disable its use by Melodia by running the MPSETUP program. Processes: On the top 3/4th of the Compose page, each of the highlighted magenta (purple) labels are processes that may be dialed as connections in many value inputs. Connections are indicated by the value turning from a white number to a green label. The documentation line, which appears when you click on the right mouse button, will indicate whether an input can be a connection. The letter part of the label will be the first character of one of the process labels plus a number to indicate which particular process is being connected. If an input is a connection, the process module indicated by the label becomes the value of the input. For example, the Kb input of the first voice in the Play page defaults to green R4. This means that the output from Random generator #4, a number from 0 to 24 in the default setting, will be sent to the voice. If you dial voice #1's Kb connection to the right it will pass through other connection labels and eventually become a white numerical value. At a glance, the processes are: Bsq (B1 - B8): Bank sequencers Fol (F1 - F4): Follow processors Inv (I1 - I4): Invert processors Lmt (L1 - L5): Limit processors Ran (R1 - R4): Random generators * (R5 - R8): Random generators Ssq (S1 - S8): Switch sequencers Tst (T1 - T4): Test processors Val (V1 - V8): Value processors * (b1 - b8): Reset flags for Bank Sequencers * (s1 - s8): Reset flags for Step Sequencers * (w1 - w4): Fade values from 1st group of 4 voices * (x1 - x4): Fade values from 2nd group of 4 voices * (y1 - y4): Fade values from 3rd group of 4 voices * (z1 - z4): Fade values from 4th group of 4 voices * (@0 - @F): MIDI Program Change received * (1a - -n): Individual Clock Module Ticks * (hF - L#): System Status In the above an "*" indicates a connection to a virtual process, one that is not visible on the screen. Except for these, all of the processes end with a Note/Value output readout. Usually there is also an offset (indicated by the + icon at the top of the column), which adds the value or connection to the process just before it is sent to the output. The N/V column is a readout of the final result of the process, either in note or numerical readout. The process result is not changed in any way by switching from N to V: it is always seen as a numerical value to whatever is reading it. Bsq (B1 - B8) Bank sequencers: The basic function of the Bank Sequencer is simple: it reads a value that you have stored at a memory location. The various ways that you can read values and the ability to store information in an automated way gives the Bank Sequencer such great utility that it will likely become the process you depend on most. There are 10 memory banks, of 10,00 memory locations each. The "B" column specifies which bank a particular process will read from. Within that bank, the high and low address ("aH" & "aL") inputs select the memory cell that will be accessed or written to. Clocks treat the address high and address low as a single address of up to 10,000 cells. The actual range is from 0 to the address specified by the End button, the column of dots labeled "E." This defaults to 24, you can set it to any address by dialing that address into the high and low address inputs, then clicking on the End button. It will change from a large green dot to a bright yellow circle. Clocks can step the high and low address up, down, up & down, random or random up/down. Up (the up arrow) will increment the address up to and including the End address, then on the next clock tick it will reset the address to 0. Down (the down arrow) does the reverse, resetting after address 0 to the End address. Up/down (the up/down arrow) does both - the address will be incremented up through the End address, then it will decrement down to 0, then increment up, etc. Random (a question mark) will select a random address from within the range of 0 to the End address. Random up/down is a special case that works like up/down, except that it will switch directions at random times. That is, it does not quite count up to the End address, then down to 0, etc. Rather it counts up for a while, then down for a while, etc. The up down cycles are weighted to be more likely to continue on the current direction than to change directions at each clock cycle. This gives an up/down wandering that is more natural and melody-like. There are times when you might want the clock to increment in steps greater than 1. The DNA text is a good example of this. DNA text is set up as sequences of characters that are grouped in three's representing the amino acids produced by the DNA. Thus, to step through the DNA you would step in increments of three. The column labeled delta (triangle icon) allows you to do this by varying the step size from 0 to 15 steps at a time. Normally this is set to 1, but in the DNA example, you would set this to 3. The next column is the address offset. Usually you want the address given by the high and low address inputs. But when you are clocking multiple values such as the DNA example, you would set three processors to be exactly the same, including an offset of 3; then you would leave the first of these at offset 0, which means it reads at address given; and you would set the offset to the other two at 1 and 2, to read from the given address plus 1, and at the given address plus 2. The following formula calculates the actual address of a cell within the 100,000 cell range of the Bank Sequencer: cell = (bank x 10,000) + (address high x 100) + address low + offset Setting the Delta input at 0 is a special case. This disables the clock from changing the address and enables a connection in the address high and low inputs to change address. This is a subtle but powerful feature. It allows you to use the processor as a translator as well as a sequencer. For example, to generate a random value that gives random scale values, set the first 7 values to the 7 notes of a scale, set the random processor to a limit of 7, then dial a connection to that processor to the low address input, with Delta set to 0. Unless Delta is 0, you cannot dial connections - the addresses will stop at 0. When you use connections as addresses, the End address is ignored. Any location can be addressed by combinations of high and low address input connections. You effectively have 100 sub-banks of 100 locations. The two digit readout (# icon) gives you access to the addressed memory cell. It is the contents of the cell when you read it; when you dial in a value it changes the cell to that value. If you dial left past 0, the cell becomes a connection. Fol (F1 - F4) Follow processors: The Follow processor attempts to catch up with the input value (arrow icon). At each clock step the processor generates a value that is one step closer to the input, plus the offset (+ icon) value. Inv (I1 - I4) Invert processors: The input, directly under the label, is scaled to a percentage given by the scale (%) input value. If the scale input is 0, no scaling is done (same as 100%). If it is not zero, the offset (+-) value/connection becomes the center point. The scaled value is added to the center point and sent to the first output (+N/V), it is then subtracted from the center point and sent to the second output (-N/V). If the offset (+-) input is zero, there is no center point, and an absolute invert is done. In this case, the scaled value is sent directly to the +N/V output, then it is subtracted from 127 and sent to the -N/V output. Note that for each of the four Invert processors, there are two outputs, the odd numbered one is the +N/V output and the even numbered one is the -N/V output. Lmt (L1 - L4) Limit processors: The input value/connection (#) is scaled to a percentage given by the scale (%) input value (0=100%). The offset (+) input value/connection is added and the final result is limited to the limit (Lm) value/connection. Ran (R1 - R4) Random generators: These processors will generate a new random value each time the clock ticks, then add the offset value or connections to it. If you set the random limit value to 0, the random process is disabled, but you can still use the offset value/connection. This is of particular importance for the 4th Ran processor, which has a special use. It is the input to the "R" bank copy in the File menu. This will be covered in greater detail in the File menu section. R4 is also unique in its ability to generate values limited to the C major and C minor scales. The green icon to the left of the magenta 4 at the beginning of the processor controls this. Click on it to switch between major and minor scale, or no scale (no change of the input). This effect is done after the offset is added, so you can optionally disable the random number by setting the limit to 0, and use the offset as an input to any other processor, which will then be converted to the scale. (R5 - R8) Random generators: These connections deliver a new random number in the range of 0-127 every computer cycle. Since all clocked processes only "look" when their clock ticks, the rapidly changing random numbers from R5-R8 is "sampled" as needed by these processors. Ssq (S1 - S8) Switch sequencers: Each of the 16 steps in these sequencers can be either a value or a connection. When a stage is set to a value, the process acts like a simple sequencer; when a stage is set to a connection, the process acts like a switch. To set a stage input, turn the step direction (the green icon just to the right of the clock selector) to off. To do this, dial all the way to the left, to the little green square icon. Then select a stage by sliding the number value on the blue slider area. 0=first stage, 1=2nd stage, etc. At the # input just to the right of the slider, dial in a value or (by moving the mouse far left) dial in a connection. Select the next stage with the stage slider and repeat. Tst (T1 - T4) Test processors: The Test processor is a switch between two inputs, with the output determined by a test of two other inputs. The inputs labeled #A and #B are the test inputs. The green icon between them, labeled "?" determines the test, and the output is switched from either the Y (Yes) column or the N (No) column, depending on the test results. Possible tests are: greater than, greater than or equal to, equal, less than or equal to, less than, not equal, and flipflop. The last test, flipflop, is not exactly a test. It generates the Y or N result according to the last transition from zero to non zero. Thus when the A input changes from zero to non zero, the Y input will be sent to the output; when the B input changes from zero to non zero, the N input will be sent. Test processor #4 has a unique capability. It can cause an immediate jump to another step location when a composition is playing (Play is on). The dot/check to the left of the #4 enables the jump; check enables, dot disables. When enabled, if the test condition is met, so that you get a "Y" answer, Melodia will immediately jump to the step that is the number/value in the Y column. This can be anywhere in the 0-63 range. Values greater than 63 cause a jump to the last step, #63. If the jump is backward to a lower step number, the loop count will be incremented, if the jump is forward the loop count is set to 0. The loop count is a System Status connection, found in the last group when you dial in value/connections. It is labeled L#, which stands for Loop Number. On every jump, the step from which the jump was made plus one is stored into R#, also a System Status connection. R# stands for Return Number. It is the number of the next step that would have been taken if no jump was executed. This enables you to set up a sequence somewhere away from the play sequence, jump to it from several different locations, and always return to the main sequence. To do this, simply set up your "subroutine" to end with a forced jump (something like a test of 1>0, which is always Yes) with the Y input set to R#. Each time you jump to the sequence, the location just after the one that caused the jump will be placed in R#, so when you get to the end it will jump back to wherever it came from. Val (V1 - V8) Value processors: Whatever value you set in the input gets added to the offset and sent to the N/V, subject to the slew time. If you set the slew level to 0, the output is updated instantly, any other number causes the output to change over time, with higher numbers changing more slowly. With slew set to 0, this processor can be used as a 2 input mixer. Virtual Processes: The remaining processes, in addition to the previously described Random Process R5 - R8, are available as connections, but are not visible on screen as controllable processes. (b1 - b8) Reset flags for Bank Sequencers: (s1 - s8) Reset flags for Step Sequencers: Whenever the Sequencers finish a cycle or change direction they will set their respective flag to 12 for one clock tick of whichever clock is driving the sequencer. At all other times the flag is cleared to 0. This is most useful when used as a clock connection, so you can trigger one sequencer from the reset flag of another. (w1 - w4) Fade values from 1st group of 4 voices: (x1 - x4) Fade values from 2nd group of 4 voices: (y1 - y4) Fade values from 3rd group of 4 voices: (z1 - z4) Fade values from 4th group of 4 voices: On the Play page, the 16 Fade slider values are available through these virtual process connections. Although only 16 steps are setable with the Fade sliders, when the Faders slew they go through the full 0-127 MIDI value range. These are the values accessed. (@0 - @F) MIDI Program Change received: Whenever a MIDI Program Change is sent to the computer by an external MIDI device, its value can be accessed by these 16 virtual processes. If you aren't generating external Program Changes, these will be 0. (1a - -j) Clock Ticks: The on/off status of each clock module can be accessed here. * (hF - L#) System Status: hF: Halt Flag, set to 127 if Halt is on, else set to 0 pF: Play Flag, set to 127 if in Play mode, else set to 0 sF: Stop Flag, set to 127 if in Stop mode, else set to 0 mX: Mouse X, readout of current mouse x position (0-79) mY: Mouse Y, readout of current mouse y position (0-24/0-49) kF: Keyboard Flag, briefly set to 127 when computer key is typed kV: Keyboard Value, numeric value of last computer key typed kX: Keyboard eXtended key, set to 127 if function key typed L#: Loop count number (see Tst processors) R#: Return step number (see Tst processors) Auxiliary MIDI Outputs: In the lower right corner of the Compose Page. These allow you to send just a MIDI Program Change or Control Change to control additional equipment such as reverb units. Click on the blue dot to enable, it will highlight and send the current Program Change or Control Change (whichever is enabled) to the MIDI channel that has been set in the leftmost column ("Ch"). When enabled (button is red) every time the value is changed it is sent to MIDI. File Menu: At its most basic level, the File menu lets you load and save a piece of music, and it lets you exit the program. Even these functions can be ignored if you wish. You can exit simply by typing the ESC key. If you have modified your music in any way, you will be notified, and you can type "S" to Save or "D" to Discard, or you can select those choices with the mouse from the pop up box. Unless you have changed the current name, your music will be given the name "Default." Next time you enter Melodia, your music will automatically be loaded. In order to give maximum flexibility, Melodia uses separate files for music and bank sequencer data; in order to make it easy to use, the different files are handled as a group by the File Menu. If you prefer, you can ignore the distinction and the program will keep track of everything automatically. Save: The Save box at the upper left of the File menu can be clicked to save your work at any time. If there is a check mark in front of Save, the file had been modified, a dot means no modification has been made since the last Save. You can click on the check mark to force it on or off. If you change a check to a dot, you will not be asked to save your file when you exit unless you make new changes to it. Be careful with this, as it could cause you to lose work. Erase: Erase will erase the music files associated with the current name. It will ask you for confirmation, giving you the name of the file set it is about to erase. If you select "OK," the files will be lost and you cannot recover them. You must always load the files into the workspace before you erase them. After you erase, the working name is set to "DEFAULT." Changing Save Name: The current working name is in the box under Save and Erase, in highlighted white text. You can change this by clicking on it and then typing a new name. If you type a DOS-illegal character, it will be changed to the $ character, which is legal for DOS filenames. If you hit a space, all characters past the space are erased. When you hit the Enter key, the new name will become your working name. If the previous workspace had been modified, you will be asked to Save or Discard it, then you will be asked whether to Load, Overwrite, or New. Load will load the existing file set, if none is found it will load the default setup. Overwrite will do nothing, so that the next time you Save, your current music will overwrite the old. It is like "Save as..." in the editor. New will erase the workspace so you have a new slate to work with. Loading Music Files: The column of names under the current working name are music files that you can load. Click on them and they will load, after first giving you a chance to save the current workspace if it had been modified. If you have more saved files than can be seen in the box, you can scroll them with the green happy face icon on the right edge of the box. Two different files are required for a complete music workspace. These are: Music (.MUZ) files that set the values and connections of all 64 steps of the compose and play pages. Bank files (.BNK) that specify the data in the Bank Sequencers. Since the Bank Sequencer data area is quite large - 100,000 bytes - the bank files are normally compressed. If you want to save or load them in the uncompressed form, rename the files with an "@" as the first character of the name. After you have loaded such a file, Melodia will change the first character in the work name to "$" so that it will compress the bank when you save your work. This is to help you keep from running up your disk space unintentionally. Melodia always saves both files, and when you load a workspace it loads both files if it finds them. If it does not find a particular file, it will set that file's workspace to default. At any time, you can load a work file from another piece of music into your current work file. Do this by clicking on the names Music, Bank, or Text in the box below the file area. Whichever name you click on will get a check mark and the file name area will change to show just those types of files. Click on the file name area to load that file into your current workspace, or click on the checked name to uncheck (cancel) it. Text Files: Text files are a special case. They are not actually part of the work file set. They don't even have to actually be text. They are simply files given the extension .TXT so that Melodia can recognize them. These files are loaded into the Bank Sequencer memory area in a special way. When you load a text file, Melodia loads the unmodified text into Bank 2. The text is then munched on by the computer in a process called a histogram, in which the usage of each character is counted and the characters used most often are given more harmonic notes. This is put into Bank 0 in the major scale and Bank 1 in the minor scale. Bank 3 is set according to a different formula: yours. It only works if there is a value other than zero in one of the first two cells in bank 9. Since the default bank settings are 0-7 for the eight Bsq processors, you have to set the B column of one of the processors to 9 to see it. If Melodia finds something there, then bank 3 will be set accordingly. The most frequent character will be set ("mapped") in bank 3 to the value of the first cell in bank 9, the next most frequent character will be set to the value of the second cell in bank 9, and so on. Thus if you set the first 4 cells in bank 9 to 12, 7, 4, and 9 (musical intervals of an octave, perfect 5th, major 3rd, and major 6th), any text you load will be mapped into Bank 3 with every occurrence of the most often used character set to 12, every occurrence of the next most often used character set to 7, the next to 4 and the next to 9. Assuming all the other cells in bank 9 were left at 0, all other characters of your text will be mapped to 0 on Bank 3. You may use the DOS EDIT editor directly from Melodia to create and edit text files. Do this by clicking on the Edit command in the lower right of the Files Menu. Be sure to save the files with an extension of .TXT or Melodia won't recognize them. These files, as with all Melodia work files, must be in the WORK subdirectory. When you use Edit this is automatic. DNA Files: In addition to processing regular text, Melodia can also recognize DNA sequences in a text file. These are long sequences of the characters T, A, C, and G. Several DNA files have been supplied with Melodia, which are accessible by clicking a second time on "Text" in the file menu. "Text" will change to "DNA," and the file names in the file box will be changed from files that have the extension .TXT to those with extension .DNA. Any file that Melodia loads that has a string of at least 9 of the DNA characters is recognized as a DNA file, whether it has a .TXT extension or a .DNA extension. DNA processing follows normal text processing, so the individual codons (the characters A, C, T, and G) will have intervals assigned to them just as normal text. Once a file is recognized as a DNA file, all the characters that are not part of the DNA string are removed. This is done prior to the histogram, so the discarded text will not alter the histogram. Next, the string is separated into "DNA chunks" of three characters each, which are then classified and assigned music intervals, octaves and pan settings according to which of the twenty amino acids the codon set produces. To view the specifics, and to optionally change them, edit the text file "DNASET.DAT" in the MP (not MP/WORK) directory. It turns out that DNA sequences make rather nice and recognizable melodies, whether they are used directly or as source material. Although the background on using DNA is fairly dense, actually using it is quite simple. When you load the Text file that has DNA strings, Melodia puts the DNA information into Bank 4 for the major key, and Bank 5 for the minor key. For each three DNA characters in the text banks, there is one associated protein data group of three cells in each of the DNA banks 4 and 5. The first cell is the musical interval associated with the protein, the second is the octave that is assigned according to the classification of the protein, and the third is a pan setting associated with the protein. So the most simple and direct way to use the DNA banks is to set up Bsq #1 in the normal way for using text, setting the "B" (bank) input to 0 for major key or 1 for minor key. Then set the next three Bsq B inputs to 4 (5 if minor key), set the deltas to 3 (so it counts by 3's), and set the 2nd and 3rd offsets to 1 and 2 respectively. Thus, Bsq #2 will get the pitch interval, Bsq #3 will get the octave (the interval + the octave will uniquely identify the protein), and Bsq #4 will get the pan. To be scientifically accurate use two clocks: The first connects to Bsq #1 and runs at a rate that is three times as fast as the second, which is connected to the other three Bsq's. Thus for every three codon values sequenced from B1, there will be one each of interval, octave, and pan for the associated protein that is contained in B2, B3, and B4. The octave and the interval were separated because you can use the octave to good effect for both the protein interval in B2 and the codon text interval in B1. The following table illustrates which banks are used when a text or DNA file is loaded into Melodia: Bank 0 Major key intervals assigned according to frequency of usage. 1 Minor key intervals assigned according to frequency of usage. 2 Unmodified text or DNA codons. 3 Intervals assigned according interval table on bank 9, if any. 4 Major key intervals, octaves, and pan positions of DNA proteins. 5 Minor key intervals, octaves, and pan positions of DNA proteins. 6 Unused. 7 Unused. 8 Unused. 9 Optional source table for Bank 3 intervals assigned by histogram. A-D Unused temporary holding banks. Copying Data Banks: Bank data can be easily moved around from one bank to another. This is the number-arrow-number next to Bank in the file menu. Dial the source bank, the bank you want to copy from, into the first number; then dial the destination bank into the second number. When you click on the arrow the source bank is copied into the destination bank. Previous contents of the destination bank are lost. In addition to the 10 data banks, numbered 0-9, there are also four temporary holding banks, labeled A-D. These banks are not saved nor are the contents changed when a new bank or new text is loaded. When you load a new workspace or exit Melodia they are lost. You can use them to shuffle data from one file to another, to do multiple Text mappings, whatever. The final label on the source side of the arrow is R for Random. This is an unassuming little doorway into a very powerful feature of Melodia. By setting the source to R, the destination bank will be loaded from its current address to its End mark with the results of the R4 processor, calculated once for each step between the destination bank sequencer's current address and its end icon. Although you can use the R source to simply load the bank with random values, this is only the beginning of what can be done. The Ran limit value can be set to 0, turning off the random process but leaving the offset input as a connection. Thus, you can set up any process at all, however complex, and rout it through the offset input to R4 - which will then be calculated for each clock cycle and sent to the destination bank. By updating the current address and End address of the bank for consecutive "R" dumps, you can set multiple areas on the same bank. The only limitation is that R can not accurately use slew values because it calculates at the computer's maximum speed. This means you should let Values settle to their final values, or better yet set their slew values to 0. If the End address is greater or equal to the start address, R does nothing. It is a good idea to check your address low and address high settings before using R. Usually you will want to set them to 0, to fill in the entire area between 0 and End. Sync: MIDI Sync, Start, Stop, Continue, and Song Number signals can be sent by Melodia, or it can "listen" for those signals and be controlled by them. Click on "Sync" in the File menu to set the item you want to send or receive. When MIDI sync is sent, other sequencers should be set to receive; when sync is received, one (only) other MIDI device should be set to send sync. Start, Stop and Continue are sent by the respective Melodia conductor commands on the top line of the Play page. When S/S/C is set to receive, those MIDI messages will act as a remote control to Melodia causing to it start, stop, or continue playing. Song number, when sending, sends the current step sequencer number (top line of Play), when receiving, Melodia will jump to the step sequencer number sent as a MIDI song number. Speed Star: On very complex or very fast pieces a yellow star may start to blink in the lower right hand corner of the screen. This is an indication that your computer is running out of processing time. A little blink of the star from time to time is normal. However a steady showing indicates the timing is inaccurate and your music will likely run at a different speed on a faster computer. Reducing overall tempo (top of Play page), then increasing individual clock rates helps. Historical Note: Melodia is derived from a MIDI based algorithmic composing program, called MusicBox when it was first released in 1984, with later versions renamed to "Kinetic Music Machine" ("KMM"). KMM is a kind of programming language for MIDI. It is the ultimate in flexibility at the expense of ease of use at the higher levels of musical organization. KMM was developed to experiment with algorithmic music concepts, Melodia has been developed to make it easier to use these concepts to produce musical compositions. Both of these programs are deeply indebted to the work of Joseph Schillinger, who attempted to codify art in general and music in particular into a system of small whole number relationships. Although Schillinger attempted to codify traditional, mostly Western, music, his approach to rhythmic, harmonic and melodic structures are far more suitable to computer composition than to the physical limitations of human musicians and their acoustic instruments. To a large extent his work is similar to that of the mathematicians and scientists who developed theory before technology - computers in particular - had advanced sufficiently to prove it. Schillinger died in 1943, the year the first electronic computer was born. About the Author: Melodia was written by John Dunn. John has been a pioneer in computer music and art since the mid 70's when he combined microcomputers and analog sound and video synthesizers as a graduate student at the Art Institute of Chicago. He was one of the early programmers for Atari video games, and he developed the first ever professional paint program for a microcomputer, Cromemco's "Slidemaster," released in 1981. John went on to write a major paint program for the IBM-PC, called "Lumena," and founded Time Arts Inc. of Santa Rosa, California, to market "Computer Tools for Artists." In 1984 he wrote one of the first algorithmic composing programs for MIDI, "MusicBox," which was released with full source code to the public domain two years later. MusicBox is still available on CompuServe some and other data services that support MIDI. DISCLAIMER OF WARRANTY: THIS SOFTWARE IS SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE. Copyright Notice: Melodia is Copyright (C) 1993-1994 by John Dunn. All rights reserved. Forth nucleus Copyright 1989 LMI.